import Login from './views/Login.vue'
import NotFound from './views/404.vue'
import Home from './views/Home.vue'
import Main from './views/Main.vue'
import Table from './views/nav1/Table.vue'
import echarts from './views/charts/echarts.vue'
import OrderToAddCustomer from './views/customerMag/OrderToAddCustomer'
import CustomeraAddorder from './views/customerMag/CustomeraAddorder'
import MyToAddCustomer from './views/customerMag/MyToAddCustomer'
import Department from "./views/system/Department";
import Employee from "./views/system/Employee.vue";
import ShopRegister from "./views/ShopRegister";
import ShopRegisterEdit from "./views/ShopRegisterEdit";
import Role from "./views/system/Role";
import Permission from "./views/system/Permission";
import Menu from "./views/system/Menu";
import OperationLog from "./views/system/OperationLog";
import CustomerLabel from "./views/customerMag/CustomerLabel";
import MyCustomer from "./views/customerMag/MyCustomer";
import CustomerSource from "./views/customerMag/CustomerSource";
import CustomerType from "./views/customerMag/CustomerType";
import AddCustomer from "./views/customerMag/AddCustomer";
import AcquisitionOrder from "./views/order/AcquisitionOrder";
import ClassifyList from "./views/productMag/ClassifyList";
import ProductList from "./views/productMag/ProductList";
import Statistic from "./views/statistics/Statistic";
import Page4 from "./views/messageMag/AnnouncementMag";
import TaskMag from "./views/messageMag/TaskMag";
import AccountMag from "./views/accountMag/AccountMag";
import NoticeMag from "./views/noticeMag/NoticeMag";
import StockMag from "./views/stockMag/StockMag";
import examine from "./views/noticeMag/examine";


let routes = [
  {
    path: '/login',
    component: Login,
    name: '',
    hidden: true
  },
  {
    path: '/404',
    component: NotFound,
    name: '',
    hidden: true
  },
  /*{
    path: '/',
    component: Home,
    name: '订单管理',
    iconCls: 'el-icon-goods',    //图标样式class
    children: [
      {path: '/acquisitionOrder', component: AcquisitionOrder, name: '订单列表'},
    ]
  },*/

  {
    path: '/',
    component: Home,
    name: '数据',
    leaf: true,//只有一个节点
    iconCls: 'fa fa-bar-chart',
    children: [
      {path: '/echarts', component: echarts, name: '数据图表'
      },

    ]
  },
  {
    path: '/',
    component: Home,
    name: '订单客户信息',
    leaf: true,//只有一个节点
    hidden: true,
    children: [{
      path: '/OrderToAddCustomer',
      name: '创建订单',
      component: OrderToAddCustomer,
      props: (route) => ({ orderData: route.params.orderData })
    }]

  },
  {
    path: '/',
    component: Home,
    name: '客户订单',
    leaf: true,//只有一个节点
    hidden: true,
    children: [{
      path: '/CustomeraAddorder',
      name: '客户订单',
      component: CustomeraAddorder,
      props: (route) => ({ orderData: route.params.orderData })
    }]

  },
  {
    path: '/',
    component: Home,
    name: '添加我的客户',
    leaf: true,//只有一个节点
    hidden: true,
    children: [{
      path: '/MyToAddCustomer',
      name: '添加我的客户',
      component: MyToAddCustomer,
    }]

  },
  {
    path: '/',
    component: Home,
    name: '审核管理',
    leaf: true,//只有一个节点
    hidden: true,
    children: [{
      path: '/examine',
      name: '订单审核',
      component: examine,
      props: (route) => ({ orderSn: route.params.orderSn })
    }]

  },

  /*{
    path: '/',
    component: Home,
    name: '客户管理',
    iconCls: 'el-icon-user',//图标样式class
    children: [
      {path: '/myCustomer', component: MyCustomer, name: '我的客户'},
      {path: '/customerType', component: CustomerType, name: '客户销售渠道'},
      {path: '/customerSource', component: CustomerSource, name: '客户来源'},
      {path: '/customerLabel', component: CustomerLabel, name: '客户级别'},
    ]
  },
  {
    path: '/',
    component: Home,
    name: '订单管理',
    iconCls: 'el-icon-goods',    //图标样式class
    children: [
      {path: '/acquisitionOrder', component: AcquisitionOrder, name: '订单列表'},
    ]
  },
  {
    path: '/',
    component: Home,
    name: '产品管理',
    iconCls: 'el-icon-s-promotion',    //图标样式class
    children: [
      {path: '/productList', component: ProductList, name: '产品列表'},
      {path: '/classifyList', component: ClassifyList, name: '分类列表'},
      // {path: '/addProduct', component: AddProduct, name: '添加产品'},
    ]
  },

  {
    path: '/',
    component: Home,
    name: '消息管理',
    // leaf: true,//只有一个节点
    iconCls: 'el-icon-chat-dot-round',    //图标样式class
    children: [
      {path: '/page4', component: Page4, name: '消息管理'},
      {path: '/taskMag', component: TaskMag, name: '任务管理'},
    ]
  },
  {
    path: '/',
    component: Home,
    name: '产品库存',
    leaf: true,//只有一个节点
    iconCls: 'el-icon-coin',
    children: [
      {path: '/stockMag', component: StockMag, name: '产品库存'}
    ]
  },
  {
    path: '/',
    component: Home,
    name: '账号管理',
    leaf: true,//只有一个节点
    iconCls: 'el-icon-share',
    children: [
      {path: '/accountMag', component: AccountMag, name: '账号管理'}
    ]
  },
  {
    path: '/',
    component: Home,
    name: '公告管理',
    leaf: true,//只有一个节点
    iconCls: 'fa fa-bar-chart',
    children: [
      {path: '/noticeMag', component: NoticeMag, name: '公告管理'}
    ]
  },

  {
    path: '/',
    component: Home,
    name: '系统管理',
    iconCls: 'el-icon-menu',
    children: [
      {path: '/role', component: Role, name: '角色管理'},
      {path: '/permission', component: Permission, name: '权限管理'},
      {path: '/menu', component: Menu, name: '菜单管理'},
      {path: '/department', component: Department, name: '部门管理'},
      {path: '/employee', component: Employee, name: '员工管理'},

      {path: '/operationLog', component: OperationLog, name: '操作记录'},

      {path: '/dictionary', component: Table, name: '数据字典'}
    ]
  },

  {
    path: '/OperationLog',
    component: OperationLog,
    name: '',
    hidden: true
  },
*/
  {
    path: '*',
    hidden: true,
    redirect: {path: '/404'}
  }
];

export default routes;














